import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  // 登录页面中的路由
  {
    path: "/login",
    name: "Login",
    component: () =>
      import(/* webpackChunkName: "Login" */ "../views/login/index.vue"),
  },
  {
    path: "/",
    name: "Index",
    component: () =>
      import(/* webpackChunkName: "Index" */ "../views/dashboard/index.vue"),
  },
  {
    path: "/select",
    name: "SelectList",
    component: () =>
      import(
        /* webpackChunkName: "SelectList" */ "../views/selectList/index.vue"
      ),
  },
  {
    path: "/parking",
    name: "Parking",
    component: () =>
      import(/* webpackChunkName: "Parking" */ "../views/park/index.vue"),
  },
  {
    path: "/pcparking",
    name: "PCParking",
    component: () =>
      import(/* webpackChunkName: "PCParking" */ "../views/park/pcindex.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
